<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
    <title>ddd</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <style type="text/css">
    div,
    span {
        width: 140px;
        height: 140px;
        margin: 20px;
        background: #9999CC;
        border: #000 1px solid;
        float: left;
        font-size: 17px;
        font-family: Roman;
    }
    
    div.mini {
        width: 30px;
        height: 30px;
        background: #CC66FF;
        border: #000 1px solid;
        font-size: 12px;
        font-family: Roman;
    }
    </style>
    <!--引入jquery的js库-->
    <script type="text/javascript" src="js/jquery-1.3.1.js"></script>
</head>

<body>
    <button id="cloneButton">复制</button>
    <br>
    <br>
    <br>
    <br>
    <br> ///////////////////////////////////////////////
    <br>
    <p>段落</p>
    <p>段落2</p>
    <p>段落2</p>
    <p>段落2</p>
    <p>段落2</p>
</body>
<script language="JavaScript">
$("p").click(function() {
    window.alert($(this).text());
});
//$("p").clone()表示复制一份 $("p"),但是没有复制事件
//$("p").clone(true)表示复制一份 $("p"),同时复制事件
$("#cloneButton").click(function(){
	$("p").clone(true).insertAfter($('button'));
});
</script>

</html>
